/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: CpConfig
 * Author:   sjkyll
 * Date:     2018-08-01 12:26
 * Description:
 * <author>          <time>          <version>          <desc>
 * 作者姓名         修改时间           版本号            描述
 */
package com.cdqidi.smsservice.domain;

import javax.persistence.*;
import java.util.Objects;

/**
 * 〈一句话功能简述〉<br> 
 *
 * @author sjkyll
 * @create 2018-08-01 12:26
 * @since 1.0.0
 */
@Entity
@Table(name = "cp_config")
public class CpConfig {

    private String appId;
    private String appSecret;
    private String appName;
    private String ipAddress;
    private Boolean isEnable;
    private Boolean isValidate;

    @Id
    @Column(name = "appId")
    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    @Basic
    @Column(name = "appSecret")
    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    @Basic
    @Column(name = "appName")
    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @Basic
    @Column(name = "ipAddress")
    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    @Basic
    @Column(name = "isEnable")
    public Boolean getEnable() {
        return isEnable;
    }

    public void setEnable(Boolean enable) {
        isEnable = enable;
    }

    @Basic
    @Column(name = "isValidate")
    public Boolean getValidate() {
        return isValidate;
    }

    public void setValidate(Boolean validate) {
        isValidate = validate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CpConfig cpConfig = (CpConfig) o;
        return Objects.equals(appId, cpConfig.appId) &&
                Objects.equals(appSecret, cpConfig.appSecret) &&
                Objects.equals(appName, cpConfig.appName) &&
                Objects.equals(ipAddress, cpConfig.ipAddress) &&
                Objects.equals(isEnable, cpConfig.isEnable) &&
                Objects.equals(isValidate, cpConfig.isValidate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(appId, appSecret, appName, ipAddress, isEnable, isValidate);
    }
}